\psset{unit=0.6,algebraic}
\begin{pspicture*}(-2,-1.5)(4,5.5)
\psaxes[labelFontSize=\scriptstyle,ticksize=-3pt 0,labelsep=2pt]{<->}(0,0)(-2,-1.5)(4,5.5)
\psplot[linecolor=blue]{-4}{0.98}{(x^2-1)/(x-1)}
\psplot[linecolor=blue]{1.02}{6}{(x^2-1)/(x-1)}
\footnotesize
\rput[l](1.4,2){$f(x)=\dfrac{x^2-1}{x-1}$}
\end{pspicture*}